package wc.fileUtil;

import java.io.File;
import java.util.ArrayList;
import java.util.List;

import wc.fileUtil.exception.NoReadableFileException;

public abstract class FileReader implements IFileReader {
	
	private List<String> _lines = new ArrayList<String>();
	private String _encode;
	
	public FileReader(String encode) {
		_encode = encode;
	}
	
	protected String getEncode() {
		return _encode;
	}

	@Override
	public List<String> getFileContent() {
		return _lines;
	}
	
	protected void addLine(String line) {
		_lines.add(line);
	}
	
	public void clear() {
		_lines.clear();
	}
	
	public abstract void parseFile(File file) throws NoReadableFileException;

}
